package com.geeguo.ebuilder.client.base.core.dictionary;

import com.geeguo.ebuilder.core.common.dictionary.IDictionary;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;

@Getter
@AllArgsConstructor
public enum ExcelImportTypeEnum implements IDictionary {

    User(1, "用户信息", "User");

    private final int value;
    private final String label;
    private final String code;

    public static List<ExcelImportTypeEnum> getEnumValues() {
        return Arrays.asList(values());
    }

    public static ExcelImportTypeEnum parse(int value) {
        for (ExcelImportTypeEnum item : ExcelImportTypeEnum.values()) {
            if (value == item.getValue()) {
                return item;
            }
        }
        return null;
    }
}